﻿<Page
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:RichMan4LApp"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:GameClassLibrary="using:GameClassLibrary"
    x:Class="RichMan4LApp.CreateGamePage"
    mc:Ignorable="d"
    Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" Loaded="Page_Loaded">
	<Page.Resources>
		<x:String x:Key="ConditionsToWinString">获胜条件</x:String>
		<x:Double x:Key="FlyoutThemeMinHeight">43</x:Double>
		<Thickness x:Key="FlyoutContentPanelPortraitThemeMargin">0,25.5,0,0</Thickness>
		<Thickness x:Key="FlyoutContentPanelLandscapeThemeMargin">0,0,0,0</Thickness>
		<Flyout x:Key="ConditionsToWinFlyout" FlyoutPresenterStyle="{StaticResource FlyoutPresenterStyle}">
			<Grid Background="{StaticResource DarkLime}">
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="20"/>
					<ColumnDefinition/>
					<ColumnDefinition Width="20"/>
				</Grid.ColumnDefinitions>
				<Grid.RowDefinitions>
					<RowDefinition Height="20"/>
					<RowDefinition Height="Auto"/>
					<RowDefinition Height="20"/>
					<RowDefinition Height="Auto"/>
					<RowDefinition Height="20"/>
				</Grid.RowDefinitions>
				<TextBlock x:Name="ConditionsToWinFlyoutText" TextWrapping="Wrap" Text="{StaticResource ConditionsToWinString}" FontFamily="{StaticResource Font}" FontSize="24" Grid.Row="1" Grid.Column="1" Margin="0" d:LayoutOverrides="LeftPosition, RightPosition"/>
				<ListBox x:Name="ConditionsToWinList" Margin="0" Grid.Column="1" Grid.Row="3" Background="#33FFFFFF" d:LayoutOverrides="LeftPosition, RightPosition, TopPosition, BottomPosition" Foreground="White" FontFamily="{StaticResource Font}" FontSize="18.667" SelectedIndex="0" BorderBrush="{x:Null}" SelectionChanged="ConditionsToWinList_SelectionChanged" Loaded="ConditionsToWinList_SelectionChanged">
					<x:String>资产最多</x:String>
					<x:String>$500,000</x:String>
					<x:String>$1,000,000</x:String>
					<x:String>$2,000,000</x:String>
				</ListBox>
			</Grid>
		</Flyout>
		<x:String x:Key="MoneyStartString">起始资金</x:String>
		<Flyout x:Key="MoneyStartFlyout" FlyoutPresenterStyle="{StaticResource FlyoutPresenterStyle}">
			<Grid Background="{StaticResource DarkLime}">
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="20"/>
					<ColumnDefinition/>
					<ColumnDefinition Width="20"/>
				</Grid.ColumnDefinitions>
				<Grid.RowDefinitions>
					<RowDefinition Height="20"/>
					<RowDefinition Height="Auto"/>
					<RowDefinition Height="20"/>
					<RowDefinition Height="Auto"/>
					<RowDefinition Height="20"/>
				</Grid.RowDefinitions>
				<TextBlock x:Name="MoneyStartFlyoutText" TextWrapping="Wrap" Text="{StaticResource MoneyStartString}" FontFamily="{StaticResource Font}" FontSize="24" Grid.Row="1" Grid.Column="1" Margin="0" d:LayoutOverrides="LeftPosition, RightPosition"/>
				<ListBox x:Name="MoneyStartList" Margin="0" Grid.Column="1" Grid.Row="3" Background="#33FFFFFF" d:LayoutOverrides="LeftPosition, RightPosition, TopPosition, BottomPosition" Foreground="White" FontFamily="{StaticResource Font}" FontSize="18.667" SelectedIndex="0" SelectionChanged="MoneyStartList_SelectionChanged" Loaded="MoneyStartList_SelectionChanged">
					<x:String>$200,000</x:String>
					<x:String>$100,000</x:String>
					<x:String>$50,000</x:String>
				</ListBox>
			</Grid>
		</Flyout>
		<x:String x:Key="GameTimeString">游戏时间</x:String>
		<Flyout x:Key="GameTimeFlyout" FlyoutPresenterStyle="{StaticResource FlyoutPresenterStyle}">
			<Grid Background="{StaticResource DarkLime}">
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="20"/>
					<ColumnDefinition/>
					<ColumnDefinition Width="20"/>
				</Grid.ColumnDefinitions>
				<Grid.RowDefinitions>
					<RowDefinition Height="20"/>
					<RowDefinition Height="Auto"/>
					<RowDefinition Height="20"/>
					<RowDefinition Height="Auto"/>
					<RowDefinition Height="20"/>
				</Grid.RowDefinitions>
				<TextBlock x:Name="GameTimeFlyoutText" TextWrapping="Wrap" Text="{StaticResource GameTimeString}" FontFamily="{StaticResource Font}" FontSize="24" Grid.Row="1" Grid.Column="1" Margin="0" d:LayoutOverrides="LeftPosition, RightPosition"/>
				<ListBox x:Name="GameTimeList" Margin="0" Grid.Column="1" Grid.Row="3" Background="#33FFFFFF" d:LayoutOverrides="LeftPosition, RightPosition, TopPosition, BottomPosition" Foreground="White" FontFamily="{StaticResource Font}" FontSize="18.667" SelectedIndex="0" SelectionChanged="GameTimeList_SelectionChanged" Loaded="GameTimeList_SelectionChanged">
					<x:String>无限</x:String>
					<x:String>一年</x:String>
					<x:String>六个月</x:String>
					<x:String>三个月</x:String>
					<x:String>一个月</x:String>
				</ListBox>
			</Grid>
		</Flyout>
		<x:String x:Key="GameMapString">地图</x:String>
		<Storyboard x:Name="StartStoryBoard">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="MainGrid">
				<EasingDoubleKeyFrame KeyTime="0" Value="0" EasingFunction="{StaticResource EasingFunction}"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="1" EasingFunction="{StaticResource EasingFunction}"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="MainGrid">
				<EasingDoubleKeyFrame KeyTime="0" Value="640" EasingFunction="{StaticResource EasingFunction}"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="0" EasingFunction="{StaticResource EasingFunction}"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="CreateGamePageDownImage">
				<EasingDoubleKeyFrame KeyTime="0" Value="0" EasingFunction="{StaticResource EasingFunction}"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0" EasingFunction="{StaticResource EasingFunction}"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="1" EasingFunction="{StaticResource EasingFunction}"/>
			</DoubleAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="CreateGamePageDownImage">
				<DiscreteObjectKeyFrame KeyTime="0">
					<DiscreteObjectKeyFrame.Value>
						<Visibility>Collapsed</Visibility>
					</DiscreteObjectKeyFrame.Value>
				</DiscreteObjectKeyFrame>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.5">
					<DiscreteObjectKeyFrame.Value>
						<Visibility>Visible</Visibility>
					</DiscreteObjectKeyFrame.Value>
				</DiscreteObjectKeyFrame>
			</ObjectAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Name="LeaveStoryBoard">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="MainGrid">
				<EasingDoubleKeyFrame KeyTime="0" Value="0" EasingFunction="{StaticResource EasingFunction}"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="640" EasingFunction="{StaticResource EasingFunction}"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="MainGrid">
				<EasingDoubleKeyFrame KeyTime="0" Value="1" EasingFunction="{StaticResource EasingFunction}"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="0" EasingFunction="{StaticResource EasingFunction}"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="CreateGamePageDownImage">
				<EasingDoubleKeyFrame KeyTime="0" Value="1" EasingFunction="{StaticResource EasingFunction}"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0" EasingFunction="{StaticResource EasingFunction}"/>
			</DoubleAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="CreateGamePageDownImage">
				<DiscreteObjectKeyFrame KeyTime="0">
					<DiscreteObjectKeyFrame.Value>
						<Visibility>Visible</Visibility>
					</DiscreteObjectKeyFrame.Value>
				</DiscreteObjectKeyFrame>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.5">
					<DiscreteObjectKeyFrame.Value>
						<Visibility>Collapsed</Visibility>
					</DiscreteObjectKeyFrame.Value>
				</DiscreteObjectKeyFrame>
			</ObjectAnimationUsingKeyFrames>
		</Storyboard>
	</Page.Resources>

	<Grid>

		<Rectangle x:Name="BackGroundRect" Fill="{StaticResource Lime}" d:LayoutOverrides="LeftMargin, RightMargin, TopMargin, BottomMargin, TopPosition, BottomPosition"/>
		<Image x:Name="CreateGamePageDownImage" Margin="0" Source="ms-appx:///PageResources/CreateGamePageDown.png" Stretch="UniformToFill" VerticalAlignment="Bottom"/>

		<Grid x:Name="MainGrid" Margin="0" RenderTransformOrigin="0.5,0.5">
			<Grid.RenderTransform>
				<CompositeTransform/>
			</Grid.RenderTransform>
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="40"/>
				<ColumnDefinition/>
				<ColumnDefinition Width="10"/>
				<ColumnDefinition/>
				<ColumnDefinition Width="40"/>
			</Grid.ColumnDefinitions>
			<Grid.RowDefinitions>
				<RowDefinition Height="40"/>
				<RowDefinition Height="Auto"/>
				<RowDefinition Height="40"/>
				<RowDefinition Height="Auto"/>
				<RowDefinition Height="30"/>
				<RowDefinition Height="Auto"/>
				<RowDefinition Height="30"/>
				<RowDefinition Height="Auto"/>
				<RowDefinition Height="40"/>
				<RowDefinition Height="Auto"/>
				<RowDefinition Height="20"/>
				<RowDefinition/>
				<RowDefinition Height="Auto"/>
				<RowDefinition Height="20"/>
				<RowDefinition Height="30"/>
				<RowDefinition Height="Auto"/>
				<RowDefinition Height="40"/>
			</Grid.RowDefinitions>
			<TextBlock x:Name="Title" TextWrapping="Wrap" Text="创建游戏" Margin="0" FontFamily="{StaticResource Font}" FontSize="{StaticResource PageTitleFontSize}" Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="3"/>
			<TextBlock x:Name="ConditionsToWinText" TextWrapping="Wrap" Text="{StaticResource ConditionsToWinString}" Grid.Column="1" Grid.Row="3" FontSize="24" FontFamily="{StaticResource Font}"/>
			<Button x:Name="ConditionsToWinButton" Content="TextBlock" Grid.Column="3" VerticalAlignment="Stretch" Style="{StaticResource TextBlockButtonStyle}" Grid.Row="3" FontFamily="{StaticResource Font}" FontSize="24" FontWeight="Normal" d:LayoutOverrides="Height, TopPosition, BottomPosition" HorizontalAlignment="Stretch" Flyout="{StaticResource ConditionsToWinFlyout}" Loaded="ConditionsToWinList_SelectionChanged" />
			<TextBlock x:Name="MoneyStartText" TextWrapping="Wrap" Text="{StaticResource MoneyStartString}" Grid.Column="1" Grid.Row="5" FontFamily="{StaticResource Font}" FontSize="24" d:LayoutOverrides="Height, TopPosition, BottomPosition"/>
			<Button x:Name="MoneyStartButton" Content="TextBlock" Grid.Column="3" VerticalAlignment="Stretch" Style="{StaticResource TextBlockButtonStyle}" Grid.Row="5" FontFamily="{StaticResource Font}" FontSize="24" FontWeight="Normal" HorizontalAlignment="Stretch" Flyout="{StaticResource MoneyStartFlyout}" d:LayoutOverrides="Height, TopPosition, BottomPosition" Loaded="MoneyStartList_SelectionChanged" />
			<TextBlock x:Name="GameTimeText" TextWrapping="Wrap" Text="{StaticResource GameTimeString}" Grid.Column="1" Grid.Row="7" d:LayoutOverrides="Height, LeftPosition, RightPosition, TopPosition, BottomPosition" FontFamily="{StaticResource Font}" FontSize="24"/>
			<Button x:Name="GameTimeButton" Content="TextBlock" Grid.Column="3" VerticalAlignment="Stretch" Style="{StaticResource TextBlockButtonStyle}" Grid.Row="7" FontFamily="{StaticResource Font}" FontSize="24" FontWeight="Normal" HorizontalAlignment="Stretch" Flyout="{StaticResource GameTimeFlyout}" d:LayoutOverrides="Height, TopPosition, BottomPosition" Loaded="GameTimeList_SelectionChanged" />
			<TextBlock x:Name="GameMapTitle" TextWrapping="Wrap" Grid.Column="1" Grid.Row="9" FontFamily="{StaticResource Font}" FontSize="24" d:LayoutOverrides="Height, LeftPosition, RightPosition, TopPosition, BottomPosition" Text="{StaticResource GameMapString}"/>
			<Grid Margin="0,-0.167,0,0" Grid.Column="1" Grid.Row="11" d:LayoutOverrides="LeftPosition, RightPosition, TopPosition, BottomPosition" Grid.ColumnSpan="3" Grid.RowSpan="3">
				<FlipView x:Name="GameMapView" Margin="0" d:LayoutOverrides="LeftPosition, RightPosition"/>
			</Grid>
			<TextBlock x:Name="GameMapText" TextWrapping="Wrap" Grid.Column="1" Grid.Row="12" FontFamily="{StaticResource Font}" FontSize="24" Margin="0" Text="{StaticResource GameMapString}" d:LayoutOverrides="LeftPosition, RightPosition, TopPosition, BottomPosition" Grid.ColumnSpan="3" TextAlignment="Center"/>
			<Button x:Name="MainPageButton" Grid.Column="1" HorizontalAlignment="Left" Margin="0" Grid.Row="15" VerticalAlignment="Stretch" Style="{StaticResource TextBlockButtonStyle}" FontFamily="{StaticResource Font}" d:LayoutOverrides=" TopPosition, BottomPosition" FontSize="21.333" Click="MainPageButton_Click">
				<Grid>
					<Grid.ColumnDefinitions>
						<ColumnDefinition Width="Auto"/>
						<ColumnDefinition Width="5"/>
						<ColumnDefinition Width="Auto"/>
					</Grid.ColumnDefinitions>
					<TextBlock Margin="0" TextWrapping="Wrap" Text="主界面" d:LayoutOverrides="Width, Height" FontFamily="{StaticResource Font}" Grid.Column="2"/>
					<TextBlock Margin="0" TextWrapping="Wrap" d:LayoutOverrides="Width, Height" FontFamily="ms-appx:/Fonts/FontAwesome.otf#FontAwesome" Text="&#xF060;" HorizontalAlignment="Center" VerticalAlignment="Center" FontWeight="Light"/>
					<Rectangle Grid.ColumnSpan="3">
						<Rectangle.Fill>
							<SolidColorBrush Color="{StaticResource Transparent}"/>
						</Rectangle.Fill>
					</Rectangle>
				</Grid>
			</Button>
			<Button x:Name="PlayerConfigPageButton" Grid.Column="3" HorizontalAlignment="Right" Margin="0,0,0,-0.333" Grid.Row="15" VerticalAlignment="Stretch" Style="{StaticResource TextBlockButtonStyle}" d:LayoutOverrides="TopPosition, BottomPosition" FontFamily="Segoe UI Symbol" FontSize="21.333" Click="PlayerConfigPageButton_Click">
				<Grid Margin="0">
					<Grid.ColumnDefinitions>
						<ColumnDefinition Width="Auto"/>
						<ColumnDefinition Width="5"/>
						<ColumnDefinition Width="Auto"/>
					</Grid.ColumnDefinitions>
					<TextBlock Margin="0" TextWrapping="Wrap" Text="人物设定" d:LayoutOverrides="Width, Height" FontFamily="{StaticResource Font}"/>
					<TextBlock Margin="0" TextWrapping="Wrap" d:LayoutOverrides="Width, Height" FontFamily="ms-appx:/Fonts/FontAwesome.otf#FontAwesome" Text="&#xF061;" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center" FontWeight="Light"/>
					<Rectangle Grid.ColumnSpan="2">
						<Rectangle.Fill>
							<SolidColorBrush Color="{StaticResource Transparent}"/>
						</Rectangle.Fill>
					</Rectangle>
				</Grid>
			</Button>

		</Grid>
	</Grid>
</Page>
